<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>轻聘-注册</title>
    <link rel="stylesheet" href="/hire/css/user/login/login.css">
    <link rel="stylesheet" href="/hire/plugins/layui/css/layui.css">
    <link rel="icon" href="/hire/imgs/favicon.ico" type="image/x-icon"/>
</head>

<body>
<div id="app">
    <div class="login_port">
        <h1>轻聘</h1><span>&nbsp|&nbsp欢迎使用轻聘&nbsp&nbsp</span>
    </div>
    <div id="login-box">
        <div class="login_method">
            <button type="button" class="current" style="margin-left: 60px" onclick="changePhone()">手机注册</button>
            <button type="button" style="margin-left: 75px" onclick="changeEmail()">邮箱注册</button>
        </div>



        <div id="myphone">
            <form class="layui-form" action="#" id="login_phone" style="display: block;">
                <div class="layui-form-item">
                    <label class="layui-form-label"><img src="/hire/imgs/phone.png" style="width: 25%;">&nbsp;&nbsp;手机号</label>
                    <div class="layui-input-inline">
                        <input type="text" v-model.trim="phone" id="phone" name="phone" lay-verify="required"
                               placeholder="请输入手机号" autocomplete="off" class="layui-input">
                    </div>
                    <button class="layui-btn layui-btn-sm layui-btn-primary" onclick="sendPhone">发送验证码</button>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><img src="/hire/imgs/pwd.png"
                                                         style="width: 25%;">&nbsp;&nbsp;验证码</label>
                    <div class="layui-input-inline">
                        <input type="text" v-model.trim="phoneCode" id="phoneCode" name="code" placeholder="请输入验证码"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="login-button">
                    <button type="button" @click="loginByPhone">立即注册</button>
                </div>
            </form>
        </div>


<!--        <div id="myemail">-->
<!--            <form class="layui-form" action="#" id="login_email" style="display: none;">-->
<!--                <div class="layui-form-item">-->
<!--                    <label class="layui-form-label"><img src="/hire/imgs/phone.png" style="width: 25%;">&nbsp;&nbsp;邮&nbsp;&nbsp;&nbsp;&nbsp;箱</label>-->
<!--                    <div class="layui-input-inline">-->
<!--                        <input type="text" v-model.trim="phone" id="email" name="phone" value="" lay-verify="required"-->
<!--                               placeholder="请输入邮箱" autocomplete="off" class="layui-input">-->
<!--                    </div>-->
<!--                    <button class="layui-btn layui-btn-sm layui-btn-primary" onclick="emailSend">发送验证码</button>-->
<!--&lt;!&ndash;                    <button onclick="emailSend" value="">发送验证码</button>&ndash;&gt;-->
<!--                </div>-->
<!--                <div class="layui-form-item">-->
<!--                    <label class="layui-form-label"><img src="/hire/imgs/pwd.png" style="width: 25%;">&nbsp;&nbsp;验证码</label>-->
<!--                    <div class="layui-input-inline">-->
<!--                        <input type="text" v-model.trim="phoneCode" id="emailCode" name="code" placeholder="请输入验证码"-->
<!--                               autocomplete="off" class="layui-input">-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="layui-form-item">-->
<!--                    <label class="layui-form-label"><img src="/hire/imgs/pwd.png"-->
<!--                                                         style="width: 25%;">&nbsp;&nbsp;密&nbsp;&nbsp;&nbsp;&nbsp;码</label>-->
<!--                    <div class="layui-input-inline">-->
<!--                        <input type="text" v-model.trim="password" id="password2" name="code" placeholder="请输入密码"-->
<!--                               autocomplete="off" class="layui-input">-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="login-button">-->
<!--                    <button type="button" @click="loginByEmail">立即注册</button>-->
<!--                </div>-->
<!--            </form>-->
<!--        </div>-->
        <div id="myemail">
            <form class="layui-form" action="#" id="login_email" style="display: none;">
                <div class="layui-form-item">
                    <label class="layui-form-label"><img src="/hire/imgs/email.png" style="width: 25%;">&nbsp;&nbsp;&nbsp;邮&nbsp;&nbsp;&nbsp;&nbsp;箱</label>
                    <div class="layui-input-inline">
                        <input type="text" v-model.trim="email" name="email" id="email" lay-verify="required"
                               placeholder="请输入邮箱" autocomplete="off" class="layui-input">
                    </div>
                    <button class="layui-btn layui-btn-sm layui-btn-primary" @click.prevent="sendEmail">发送验证码</button>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><img src="/hire/imgs/pwd.png"
                                                         style="width: 25%;">&nbsp;&nbsp;验证码</label>
                    <div class="layui-input-inline">
                        <input type="text" v-model.trim="emailCode" name="code" id="emailCode" placeholder="请输入验证码"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><img src="/hire/imgs/pwd.png"
                                                         style="width: 25%;">&nbsp;&nbsp;密&nbsp;&nbsp;&nbsp;&nbsp;码</label>
                    <div class="layui-input-inline">
                        <input type="text" v-model.trim="password" name="password" id="password" placeholder="请输入密码"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="login-button">
                    <button type="button" @click="registerByEmail1">立即注册</button>
                </div>
            </form>
        </div>
        <div class="regist"><span>已有轻聘账号|</span><a href="/hire/login">立即登录</a></div>
    </div>
</div>
<script src="/hire/plugins/jquery/jquery.min.js"></script>
<script src="/hire/plugins/layui/layui.js"></script>
<script src="/hire/plugins/vue/vue.js"></script>
<script src="/hire/plugins/vue/axios.min.js"></script>
<script src="/hire/js/user/register.js"></script>
<!--<script>-->
<!--    function registerByEmail() {-->
<!--        let email = $("#email").val();-->
<!--        let password = $("#emailCode").val();-->
<!--        let cod = $("#ePassword").val();-->
<!--        $.post('/hire/register',{email:email,password:password,cod:cod},function (res) {-->
<!--        })-->
<!--    }-->
<!--    function changeEmail() {-->
<!--        {-->
<!--            x=document.getElementById("login_phone")-->
<!--            x.style.display="none";-->
<!--            x=document.getElementById("login_email")-->
<!--            x.style.display="block";-->
<!--        }-->
<!--    }-->
<!--    function changePhone() {-->
<!--        {-->
<!--            x=document.getElementById("login_phone")-->
<!--            x.style.display="block";-->
<!--            x=document.getElementById("login_email")-->
<!--            x.style.display="none";-->
<!--        }-->
<!--    }-->
<!--    function emailSend() {-->
<!--        let email = $("#email").val();-->
<!--        console.log(email)-->
<!--        // let email = obj;-->
<!--        console.log(email)-->
<!--        $.get('/hire/register/send', {email:email},function(res){-->
<!--            console.log(res);-->
<!--            if(res.code=='404'){-->
<!--                layer.msg("邮箱不存在!")-->
<!--            }else{-->
<!--                layer.msg("发送邮箱成功!请查收!");-->
<!--            }-->
<!--        })-->
<!--    }-->
<!--</script>-->

</body>
</html>